package aes.unittests;

import aes.server.ReportManager;
import common.StatisticReportItem;

import junit.framework.TestCase;
public class MeanTest extends TestCase{
	private StatisticReportItem teacherReport;
	private StatisticReportItem courseReport;
	private StatisticReportItem studentReport;
	private StatisticReportItem nullStudentReport;
	private StatisticReportItem nullCourseReport;
	private StatisticReportItem nullTeacherReport;
	protected void setUp() throws Exception{
		teacherReport=ReportManager.getTeacherStatisticReport(2);
		
		courseReport=ReportManager.getCoursesStatisticReport(3);
		
		studentReport=ReportManager.getStudentStatisticReport(1);
		
		nullStudentReport=ReportManager.getStudentStatisticReport(10);
		nullCourseReport=ReportManager.getCoursesStatisticReport(10);
		nullTeacherReport=ReportManager.getTeacherStatisticReport(10);
		
		super.setUp();
	}


	public void testMean(){
		
		assertEquals(teacherReport.getAverage(),23.0);
		assertEquals(studentReport.getAverage(),25.0);
		assertEquals(courseReport.getAverage(),35.0);
		assertEquals(nullStudentReport.getAverage(),0.0);
		assertEquals(nullCourseReport.getAverage(),0.0);
		assertEquals(nullTeacherReport.getAverage(),0.0);
		
		
	}
}
